const maskColor = "rgba(0, 0, 0, 0.2)";
const redColor = "#FF3366";
const greenColor = "#009900";
const blueColor = "#009900";
const grayColor = "#3e4144";
const cyanColor = "#6ed0e0";
const waterColor = "#00CCFF";
const lightGreenColor = "#429c5e";
const lightOrangeColor = "#f47011";
const lightOrangeColor1 = "#eab839";
const lightOrangeColor2 = "#ffee01";
const co2Color = "#91c7ae";
const gasColor = "#61a0a8";
const titleColor = "#8f97b3";

var chart_feed = null;
var chart_mode = null;


var chart_online=null;
var chart_city_sort=null;
var chart_alarm=null;
var chart_power=null;
var chart_map=null;

var option_feed_avg  = {

    legend: {
        show:true,
        x:'center',
        y:'10',
        icon: 'stack',
        itemWidth:10,
        itemHeight:10,
        textStyle: {
            fontSize: 11,
            color: titleColor
        },
        data:['下料量(kg)',"下水量(L)"]
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            lineStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0, 255, 233,0)'
                    }, {
                        offset: 0.5,
                        color: 'rgba(255, 255, 255,1)',
                    }, {
                        offset: 1,
                        color: 'rgba(0, 255, 233,0)'
                    }],
                    global: false
                }
            },
        }
    },
    grid: {
        top: '20%',
        left: '5%',
        right: '5%',
        bottom: '15%',
        containLabel: true
    },
    xAxis: [{
        type: 'category',
        axisLine: {
            show: true
        },
        splitArea: {
            // show: true,
            color: '#f00',
            lineStyle: {
                color: '#f00'
            },
        },
        axisLabel: {
            color: titleColor
        },
        splitLine: {
            show: false
        },
        boundaryGap: false,
        //data: ['A', 'B', 'C', 'D', 'E', 'F'],

    }],
    yAxis: [{
        type: 'value',
        min: 0,
        splitLine: {
            show: false,
            lineStyle: {
                color: 'rgba(255,255,255,0.1)'
            }
        },
        axisLine: {
            show: false,
        },
        axisLabel: {
            show: true,
            margin: 20,
            textStyle: {
                color: titleColor,

            },
        },
        axisTick: {
            show: true,
        },
    },{
        type: 'value',
        min: 0,
        splitLine: {
            show: true,
            lineStyle: {
                color: 'rgba(255,255,255,0.1)'
            }
        },
        axisLine: {
            show: false,
        },
        axisLabel: {
            show: true,
            margin: 20,
            textStyle: {
                color: titleColor,

            },
        },
        axisTick: {
            show: true,
        },
    }],
    series: [{
        name: '下料量(kg)',
        type: 'line',
        //symbolSize: 3,
        smooth: true, //是否平滑
        showSymbol: true,
        // symbol: 'image://./static/images/guang-circle.png',
        //symbol: 'none',
        yAxisIndex: 0,

        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: lightOrangeColor
                }, {
                    offset: 0.8,
                    color: 'rgba(255,255,255,0)'
                }], false),
                // shadowColor: 'rgba(255,255,255, 0.1)',
                shadowBlur: 10,
                opacity:0.3,
            }
        },
        itemStyle: {
            normal: {
                color: lightOrangeColor,
                lineStyle: {
                    width: 1,
                    type: 'solid' //'dotted'虚线 'solid'实线
                },
                borderColor: lightOrangeColor, //图形的描边颜色。支持的格式同 color
                //borderWidth: 8 ,//描边线宽。为 0 时无描边。[ default: 0 ]
                barBorderRadius: 0,
                label: {
                    show: false,
                },
                opacity:0.5,
            }
        },
        tooltip: {
            show: true
        }
    }
        ,{
            name: '下水量(L)',
            type: 'line',
            smooth: true, //是否平滑
            showSymbol: true,
            yAxisIndex: 1,
            areaStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: '#00c7d9'
                    }, {
                        offset: 0.8,
                        color: 'rgba(255,255,255,0)'
                    }], false),
                    // shadowColor: 'rgba(255,255,255, 0.1)',
                    shadowBlur: 10,
                    opacity:0.3,
                }
            },
            itemStyle: {
                normal: {
                    color: '#00c7d9',
                    lineStyle: {
                        width: 1,
                        type: 'solid' //'dotted'虚线 'solid'实线
                    },
                    borderColor: '#00c7d9', //图形的描边颜色。支持的格式同 color
                    //borderWidth: 8 ,//描边线宽。为 0 时无描边。[ default: 0 ]
                    barBorderRadius: 0,
                    label: {
                        show: false,
                    },
                    opacity:0.5,
                }
            },
            tooltip: {
                show: true
            }
        }
    ]
};
var option_feed_total = {
    legend: {
        show:true,
        x:'center',
        y:'10',
        icon: 'stack',
        itemWidth:10,
        itemHeight:10,
        textStyle: {
            fontSize: 11,
            color: titleColor
        },
        data:['下料量(吨)','下水量(吨)'],
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '15%',
        top:'15%',
        containLabel: true
    },
    xAxis: [
        {
            type: 'category',
            boundaryGap: true,
            data: [],
            splitLine: {
                show: true,
                lineStyle: {
                    color: 'rgba(255,255,255,0.05)'
                }
            },
            axisLabel: {
                textStyle: {
                    color: titleColor
                },
                //alignWithLabel: true,
                //interval: 0,
                //rotate: '15'
            }
        }
    ],
    yAxis: [
        {
            type: 'value',
            //splitNumber:3,
            splitLine: {
                show: true,
                lineStyle: {
                    color: 'rgba(255,255,255,0.05)'
                }
            },
            axisLabel: {
                textStyle: {
                    color:titleColor
                }
            },
        }
    ],
    series: [
        {
            name: '下料量(吨)',
            type: 'bar',
            barWidth: '10px',
            //yAxisIndex: 0,
            data: [],
            itemStyle: {
                normal: {
                    color: lightOrangeColor1,
                    barBorderRadius: [30, 30, 30, 30],
                    shadowColor: '#f29725',
                    shadowBlur: 4,
                }
            },
        },
        {
            name: '下水量(吨)',
            type: 'bar',
            barWidth: '10px',
            //yAxisIndex: 1,
            data: [],
            itemStyle: {
                normal: {
                    color: waterColor,
                    barBorderRadius: [30, 30, 30, 30],
                    shadowColor: blueColor,
                    shadowBlur: 4,
                }
            },
        }
    ]
};

var img ="";


var option_mode_new = {
    legend: {
        show:true,
        x:'center',
        y:'10',
        icon: 'stack',
        itemWidth:10,
        itemHeight:10,
        textStyle: {
            fontSize: 11,
            color: titleColor
        },
        data:['猪群个数'],
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '15%',
        top:'15%',
        containLabel: true
    },
    xAxis: [
        {
            type: 'category',
            boundaryGap: true,
            data: [],
            splitLine: {
                show: true,
                lineStyle: {
                    color: 'rgba(255,255,255,0.05)'
                }
            },
            axisLabel: {
                textStyle: {
                    color: titleColor
                },
                //alignWithLabel: true,
                //interval: 0,
                //rotate: '15'
            }
        }
    ],
    yAxis: [
        {
            type: 'value',
            //splitNumber:3,
            splitLine: {
                show: true,
                lineStyle: {
                    color: 'rgba(255,255,255,0.05)'
                }
            },
            axisLabel: {
                textStyle: {
                    color:titleColor
                }
            },
        }
    ],
    series: [
        {
            name: '猪群个数',
            type: 'bar',
            // barWidth: '10px',
            //yAxisIndex: 1,
            data: [],
            itemStyle: {
                normal: {
                    color: waterColor,
                    //barBorderRadius: [30, 30, 30, 30],
                    // shadowColor: blueColor,
                    shadowBlur: 4,
                }
            },
        }
    ]
};
var option_mode = {
    title: {
        text: "设备模式",
        top: "45%",
        textAlign: "center",
        left: "49%",
        textStyle: {
            color: "#fff",
            fontSize: 15,
            fontWeight: "400",
        },
    },
    graphic: {
        elements: [
            {
                type: "image",
                z: 3,
                style: {
                    //image: img,
                    width: 78,
                    height: 78,
                },
                left: "center",
                top: "center",
                position: [100, 100],
            },
        ],
    },
    tooltip: {
        show: true,
    },
    legend: {
        show:false,
        icon: "circle",
        //orient: "horizontal",
        // x: 'left',
        orient: "vertical",
        data: ["公猪", "哺乳", "妊娠", "停用"],
        left: "2%",
        bottom: "2%",
        align: "left",
        textStyle: {
            fontSize: 10,
            color: 'rgba(255,255,255,.7)',
        },
        itemGap: 10,
    },
    toolbox: {
        show: false,
    },
    series: [
        {
            name: "",
            type: "pie",
            clockWise: false,
            //radius: [55, 65],
            center: ["50%", "50%"],
            radius: ['50%', '60%'],
            minAngle: 0,  //设置扇形的最小占比
            hoverAnimation: false,
            itemStyle: {
                normal: {
                    label: {
                        show: true, // false不展示
                        position: "outside", // 设置位置在饼状图的外面 inside为内部
                        fontSize: 11,
                        color: 'rgba(255,255,255,.7)',
                        formatter: function (params) {
                            var percent = 0;
                            var total = 0;
                            for (var i = 0; i < modeData.length; i++) {
                                total += modeData[i].num*rate;
                            }
                            percent = ((params.value / total) * 100).toFixed(1);
                            if (params.name !== "") {
                                return (
                                    params.name +
                                    " :" +
                                    params.value+
                                    "\n" +
                                    " " +
                                    percent +
                                    "%"
                                );
                            } else {
                                return "";
                            }
                        },
                    },
                    labelLine: {
                        length: 0,
                        length2: 15,
                        show: true,
                        color: "#00ffff",
                    },
                },
            },
            data: [],
        },
    ],
};

var option_modebak = {
    //backgroundColor: "#fff",
    title: {
        text: "饲喂模式",
        top: "45%",
        textAlign: "center",
        left: "48%",
        textStyle: {
            color: "#fff",
            fontSize: 17,
            fontWeight: "400",
        },
    },
    tooltip: {
        trigger: "item",
        show: true,
        //   formatter: "{b}: {c} ({d}%)"
    },
    legend: {
        orient: "horizontal",
        top: 16,
        icon: "circle",
        selectedMode: false,
        itemWidth: 6,
        itemHeight: 6,
        itemGap: 6,
        borderRadius: 6,
        //data: data.legend,
    },
    series: [
        {
            type: "pie",
            // clickable:false,
            // selectedMode: 'single',//单点击设置
            hoverAnimation: true,
            radius: ["40%", "67%"],
            color: [],
            label: {
                normal: {
                    position: "inner",
                    // formatter: '{d}%',
                    formatter: function (param) {
                        if (!param.percent) return "";
                        var f = Math.round(param.percent * 10) / 10;
                        var s = f.toString();
                        var rs = s.indexOf(".");
                        if (rs < 0) {
                            rs = s.length;
                            s += ".";
                        }
                        while (s.length <= rs + 1) {
                            s += "0";
                        }
                        return s + "%";
                    },
                    textStyle: {
                        color: "#fff",
                        fontSize: 12,
                    },
                },
            },
            labelLine: {
                normal: {
                    show: false,
                },
            },
            data: [],
        },
    ],
};

var option_liaota = {
    //backgroundColor: '#aaa', //背景色
    series: [{
        type: 'liquidFill',
        data: [0],
        color: ['#f4ea2a'],//green #12dddd red #d81e06 yellow f4ea2a
        radius: '70%',
        //shape: 'rect',
        center: ['45%', '45%'],
        shape: "path://M10593 16061c-382,0 -1436,-148 -1481,-155l-44 -6 0 -2718 56 6c11,1 1083,110 1470,110 387,0 1458,-109 1468,-110l57 -6 0 2718 -44 6c-45,7 -1100,155 -1482,155l0 0zm-1423 -250c208,29 1092,148 1423,148 332,0 1216,-119 1424,-148l0 -2516c-229,23 -1078,106 -1423,106 -345,0 -1195,-83 -1424,-106l0 2516z path://M9120 13269l-51 -89 1087 -625 2 -1c11,-5 31,-15 40,-21 3,-4 9,-14 15,-24l2 -42 790 -3 11 41c4,11 10,23 13,28 10,6 27,17 38,24l1052 624 -52 88 -1053 -625c-4,-2 -35,-21 -48,-31 -5,-3 -18,-12 -35,-46l-635 2c-10,18 -24,37 -38,47 -16,11 -45,25 -55,30l-1083 623 0 0zm2897 2540l102 0 0 1286 -102 0 0 -1286zm-2949 0l102 0 0 1286 -102 0 0 -1286z path://M10594 13401c-345,0 -1195,-83 -1424,-106l0 2514 0 2c208,29 1092,148 1423,148 332,0 1216,-119 1424,-148l0 -2 0 -2514c-229,23 -1078,106 -1423,106z",
        amplitude: 0,
        waveAnimation: false,
        outline: {
            show: false
        },
        backgroundStyle: {
            shadowColor: 'rgba(200, 200, 200, 0.8)',
            shadowBlur: 20
        },
        label:{
            show:true,
            fontSize:13
        }
    }]
};

var option_online_bak = {
    title:[{
        text: '在线状态',
        x: 'center',
        y: '85%',
        textStyle: {
            fontSize: 12,
            fontWeight: 'bold',
            fontStyle: 'normal',
            color: '#fff'
        }
    },{
        text: '90%',
        x: 'center',
        y: 'center',
        textStyle: {
            fontSize: 18,
            fontWeight: 'bold',
            fontStyle: 'normal',
            color: '#fff'
        }
    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
        position: function (p) {   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
        //orient: 'vertical',
        //top: 'center',
        //right: '8%',
        show:false,
        x:'center',
        itemWidth: 10,
        itemHeight: 10,
        data: ['在线', '离线'],
        textStyle: {
            color: 'rgba(255,255,255,.5)',
            fontSize: '12',
        }
    },
    series: [
        {
            name: '业务分类',
            type: 'pie',
            center: ['50%', '50%'],
            radius: ['55%', '65%'],
            color: ['#3acdfb', '#253587',  '#e58c00', '#eb295b'],
            label: { show: false },
            labelLine: { show: false },
            data: [
                { value: 10, name: '在线' },
                { value: 20, name: '离线' },
            ]
        }
    ]
};

var option_online = {
    //backgroundColor: "222",
    title:[{
        text: '在线情况',
        x: 'center',
        y: '3%',
        textStyle: {
            fontSize: 12,
            fontWeight: 'bold',
            fontStyle: 'normal',
            color: 'rgba(255,255,255,.7)',
        }
    }],
    legend: {
        show:false,
    },
    grid: {
        top: "10%",
        left: "0",
        right: "10%",
        bottom: "10%",
        containLabel: true,
    },
    yAxis: [
        {
            type: "category",
            data: ["饲喂器", "环控器","料线"],
            inverse: true,
            axisTick: {
                show: false,
            },
            axisLabel: {
                margin: 20,
                textStyle: {
                    fontSize: 13,
                    color: 'rgba(255,255,255,.5)',
                },
            },
            axisLine: {
                show: false,
            },
        },
        {
            type: "category",
            inverse: true,
            axisTick: "none",
            axisLine: "none",
            show: true,
            axisLabel: {
                textStyle: {
                    color: 'rgba(255,255,255,.5)',
                    fontSize: "12",
                },
                formatter: "{value}%",
            },
            data: [],
        }
    ],
    xAxis: [
        {
            type: "value",
            axisLabel: {
                show: false,
            },
            axisLine: {
                show: false,
            },
            splitLine: {
                show: false,
            },
        },
    ],
    series: [
        {
            type: "bar",
            barWidth: 14,
            data: [100, 0,0],
            /*label: {
                normal: {
                    show: true,
                    position: "insideBottomRight",
                    formatter: "{c}%",
                    distance: 0,
                    offset: [10, -20],
                    color: "#fff",
                    fontSize: 13,
                    padding: [5, 5, 5, 5],
                    backgroundColor: {
                        image:
                            "",
                    },
                },
            },*/
            /*label: {
                normal: {
                    show: true,
                    textStyle: {
                        color: "#fff",
                        fontSize: 11,
                        fontWeight: "bold",
                    },
                    position: "inside",
                    formatter: "{c}%",
                },
            },*/
            itemStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(
                        1,
                        0,
                        0,
                        0,
                        [
                            {
                                offset: 0,
                                color: "#57eabf", // 0% 处的颜色
                            },
                            {
                                offset: 1,
                                color: "#2563f9", // 100% 处的颜色
                            },
                        ],
                        false
                    ),
                    barBorderRadius: 14,
                },
            },
        },
        {
            type: "bar",
            barWidth: 14,
            xAxisIndex: 0,
            barGap: "-100%",
            data: [100, 100,100],
            itemStyle: {
                normal: {
                    //color: "#444a58",
                    color: 'rgba(0,0,0,.2)',
                    barBorderRadius: 14,
                },
            },
            zlevel: -1,
        },
    ],
};

var option_province_sort = {
    title:[{
        text: '省份排名',
        x: 'center',
        y: '3%',
        textStyle: {
            fontSize: 12,
            fontWeight: 'bold',
            fontStyle: 'normal',
            color: 'rgba(255,255,255,.7)',
        }
    }],
    tooltip: {
        trigger: "axis",
        show: true,
        axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: "shadow", // 默认为直线，可选为：'line' | 'shadow'
        },
    },
    legend: {
        show:true,
        itemGap: 20,
        bottom: '10%' // 距离容器顶部的百分比
    },
    grid: {
        top: "20%",
        left: "0",
        right: "15%",
        bottom: "0%",
        containLabel: true,
    },
    xAxis: [
        {
            splitLine: {
                show: false,
            },
            type: "value",
            show: false,
        },
    ],
    yAxis: [
        {
            splitLine: {
                show: false,
            },
            axisLine: {
                //y轴
                show: false,
            },
            type: "category",
            axisTick: {
                show: false,
            },
            inverse: true,
            data: ["龙岩", "武汉", "东莞", "中山", "其他"],
            axisLabel: {
                textStyle: {
                    color: 'rgba(255,255,255,.5)',
                    fontSize: 11,
                },
            },
        },
    ],
    series: [
        {
            //name: "在线情况",
            type: "bar",
            barWidth: 8, // 柱子宽度
            label: {
                show: true,
                position: "right", // 位置
                color: 'rgba(255,255,255,.5)',
                fontSize: 12,
                distance: 12, // 距离
                formatter: "{c} 台", // 这里是数据展示的时候显示的数据
            }, // 柱子上方的数值
            /*itemStyle: {
                barBorderRadius: [0, 0, 0, 0], // 圆角（左上、右上、右下、左下）

                color: "#419fff",
            },*/

            itemStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(
                        1,
                        0,
                        0,
                        0,
                        [
                            {
                                offset: 0,
                                color: "#57eabf", // 0% 处的颜色
                            },
                            {
                                offset: 1,
                                color: "#2563f9", // 100% 处的颜色
                            },
                        ],
                        false
                    ),
                    barBorderRadius: 14,
                },
            },
            data: [28, 16, 12, 8, 3],
        },
    ],
};


var option_power = {
    //  backgroundColor: '#00265f',
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    legend: {
        data: ['用电', '用水'],
        top: '5%',
        textStyle: {
            color: "#fff",
            fontSize: '12',

        },

        //itemGap: 35
    },
    grid: {
        left: '0%',
        top: '40px',
        right: '0%',
        bottom: '0',
        containLabel: true
    },
    xAxis: [{
        type: 'category',
        data: [],
        axisLine: {
            show: true,
            lineStyle: {
                color: "rgba(255,255,255,.1)",
                width: 1,
                type: "solid"
            },
        },
        axisTick: {
            show: false,
        },
        axisLabel: {
            interval: 0,
            // rotate:50,
            show: true,
            //  splitNumber: 2,
            textStyle: {
                color: "rgba(255,255,255,.6)",
                fontSize: '12',
            },
        },
    }],
    yAxis: [
        {
            type: 'value',
            axisLabel: {
                //formatter: '{value} %'
                show: true,
                textStyle: {
                    color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                },
            },
            axisTick: {
                show: false,
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: "rgba(255,255,255,.1	)",
                    width: 1,
                    type: "solid"
                },
            },
            splitLine: {
                lineStyle: {
                    color: "rgba(255,255,255,.1)",
                }
            }
        }],
    series: [

        {
            name: '用电',
            type: 'line',
            smooth: true,
            data: [],
            barWidth: '15',
            // barGap: 1,
            itemStyle: {
                normal: {
                    color: '#62c98d',
                    opacity: 1,
                    barBorderRadius: 5,
                }
            }
        },
        {
            name: '用水',
            type: 'line',
            smooth: true,
            data: [],

            itemStyle: {
                normal: {
                    color: '#00CCFF',
                    opacity: 1,
                    barBorderRadius: 5,
                }
            }
        }
    ]
};

var option_alarm = {
    title:[{
        //text: '告警分析',
        x: 'center',
        y: '1%',
        textStyle: {
            fontSize: 12,
            fontWeight: 'bold',
            fontStyle: 'normal',
            color: 'rgba(255,255,255,.7)',
        }
    }],
    tooltip: {
        trigger: 'axis'
    },

    radar: [
        {
            name: {
                fontSize: 11,
                textStyle: {
                    color: 'rgba(255,255,255,.6)',
                }
            },
            splitLine: {
                lineStyle: {
                    color: 'rgba(255,255,255,.0',
                    width: 2
                }
            },
            axisLine: {
                lineStyle: {
                    color: 'rgba(255,255,255,0.2)',
                    width: 1,
                    type: 'dotted'

                },
            },
            splitArea: {
                areaStyle: {
                    color: ['rgba(255,255,255,.1)', 'rgba(255,255,255,0)']
                }
            },
            indicator: [
                { text: '离线', max: 100 },
                { text: '堵料', max: 100 },
                { text: '空转', max: 100 },
                { text: '无水料', max: 100 },
                { text: '电机故障', max: 100 },
                { text: '温度高', max: 100 },
                { text: '温度低', max: 100 },
                { text: '其他', max: 100 },
            ],
            center: ['50%', '55%'],
            radius: ["25%", "70%"],
            radius: 60
        },
    ],
    color: ['#9DD060', '#35C96E', '#4DCEF8'],
    series: [
        {
            type: 'radar',
            tooltip: {
                trigger: 'item',
                //formatter: "{c}%",
            },
            areaStyle: {
                normal: {
                    opacity: 0.3,
                }
            },
            data: [
                {
                    value: [60, 73, 85, 40,0,0,0,0],
                    name: '告警分析:'
                }
            ]
        }

    ]
};

var map_option = {
    // backgroundColor: '#404a59',

    /*tooltip : {
        trigger: 'item',
        formatter: function (params) {
            //return params.name + " : " + params.value[2];
            return params.name;
        },
    },*/

    geo: {
        map: 'china',
        //top:'1%',
        //left: '30',
        //right: '10%',
        //bottom:'5%',
        zoom: 0.8,//缩放
        label: {
            emphasis: {
                show: false
            }
        },
        roam: true,
        itemStyle: {
            normal: {
                areaColor: '#4c60ff',
                borderColor: '#002097'
            },
            emphasis: {
                areaColor: '#293fff'
            }
        }
    },
    series : [
        {
            name: '',
            type: 'effectScatter',

            showEffectOn: 'render',
            rippleEffect: {
                brushType: 'stroke'
            },
            coordinateSystem: 'geo',
            //data: convertData(data),
            data:[],
            symbolSize: function (val) {
                console.info(val)
                //return val[2] / 15;
                if(val[2]<=100*rate){
                    return 4;
                }else if (val[2]>100*rate && val[2]<200*rate){
                    return 6;
                }else if (val[2]>200*rate && val[2]<300*rate){
                    return 7;
                }else if (val[2]>300*rate && val[2]<400*rate){
                    return 8;
                }else if (val[2]>400*rate && val[2]<500*rate){
                    return 9;
                }else if (val[2]>500*rate && val[2]<600*rate){
                    return 11;
                }else{
                    return 12;
                }
            },
            label: {
                normal: {
                    formatter: '{b}',
                    position: 'right',
                    show: false //是否显示标签
                },
                emphasis: {
                    show: true
                }
            },
            itemStyle: {
                normal: {
                    color: '#ffeb7b'
                }
            }
        },
        {
            name: "点",
            type: "scatter",
            coordinateSystem: "geo",
            symbol: "pin",
            symbolSize: 30,
            label: {
                normal: {
                    show: false,
                    textStyle: {
                        color: "#fff",
                        fontSize: 9,
                    },
                },
            },
            itemStyle: {
                normal: {
                    color: "#3acdfb", //标志颜色
                },
            },
            zlevel: 6,
            data: [],
        }
    ]
};






